<?php

namespace common\validate;


class Schedule extends BaseValidate
{
    // 验证规则
    protected $rule = [];

    // GetEpisodeSchedule
    public function sceneGetEpisodeSchedule()
    {
        return $this->append('param.filter.project_id', 'require');
    }

    // GetEpisodeStepCategorySchedule
    public function sceneGetEpisodeStepCategorySchedule()
    {
        return $this->append('param.filter.project_id', 'require')
            ->append('param.filter.episode_id', 'require');

    }

    // GetEpisodeStepCategoryEntityTaskSchedule
    public function sceneGetEpisodeStepCategoryEntityTaskSchedule()
    {
        return $this->append('param.filter.project_id', 'require')
            ->append('param.filter.episode_id', 'require')
            ->append('param.filter.code', 'require');

    }

    // sceneCreateScheduleManageData
    public function sceneCreateScheduleManageData()
    {
        return $this->append('param.data', 'require');
    }

    // sceneCreateScheduleManageDataItem
    public function sceneCreateScheduleManageDataItem()
    {
        return $this->append('time', 'require|date')->append('is_work', 'require|in:yes,no,default');
    }

    // sceneGetScheduleManageList
    public function sceneGetScheduleManageList()
    {
        return $this->append('param', 'require')->append('param.start_time', 'require')->append('param.end_time', 'require');
    }
}
